package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.it;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

@Deprecated
@Entity
@Table(name = "t_it_network_device")
public class ItNetworkDevice implements Serializable {

    @Id
    @Column(name = "asset_id")
    private String assetId;

    @Column(name = "user_id")
    private String userId;

    @Column(name = "asset_ip")
    private String assetIp;

    @Column(name = "asset_use")
    private String assetUse;

    @Column(name = "brand_type")
    private String brandType;

    @Column(name = "brand_sys")
    private String brandSys;

    @Column(name = "brand_sn")
    private String brandSn;

    @Column(name = "machine_cab")
    private String machineCab;

    @Column(name = "machine_status")
    private String machineStatus;

    @Column(name = "insert_time", columnDefinition = "datetime comment '创建时间'")
    @org.hibernate.annotations.CreationTimestamp
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime insertTime;

    @Column(name = "update_time", columnDefinition = "datetime comment '更新时间'")
    @org.hibernate.annotations.UpdateTimestamp
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime updateTime;

    @Column(name = "machine_sup")
    private String machineSup;

    @Column(name = "capital_typed")
    private String capitalTyped;

    @Column(name = "brand")
    private String brand;

    @Column(name = "machine_room")
    private String machineRoom;

    @Column(name = "start_time")
    private LocalDateTime startTime;

    @Transient
    private String startTimeStr;

    @Column(name = "end_time")
    private LocalDateTime endTime;

    @Transient
    private String endTimeStr;

    @Column(name = "capital_type")
    private String capitalType;

    @Transient
    private String userName;

    @Transient
    private String department;

    public String getStartTimeStr() {
        return startTimeStr;
    }

    public void setStartTimeStr(String startTimeStr) {
        this.startTimeStr = startTimeStr;
    }

    public String getEndTimeStr() {
        return endTimeStr;
    }

    public void setEndTimeStr(String endTimeStr) {
        this.endTimeStr = endTimeStr;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getAssetId() {
        return assetId;
    }

    public void setAssetId(String assetId) {
        this.assetId = assetId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getAssetIp() {
        return assetIp;
    }

    public void setAssetIp(String assetIp) {
        this.assetIp = assetIp;
    }

    public String getAssetUse() {
        return assetUse;
    }

    public void setAssetUse(String assetUse) {
        this.assetUse = assetUse;
    }

    public String getBrandType() {
        return brandType;
    }

    public void setBrandType(String brandType) {
        this.brandType = brandType;
    }

    public String getBrandSys() {
        return brandSys;
    }

    public void setBrandSys(String brandSys) {
        this.brandSys = brandSys;
    }

    public String getBrandSn() {
        return brandSn;
    }

    public void setBrandSn(String brandSn) {
        this.brandSn = brandSn;
    }

    public String getMachineCab() {
        return machineCab;
    }

    public void setMachineCab(String machineCab) {
        this.machineCab = machineCab;
    }

    public String getMachineStatus() {
        return machineStatus;
    }

    public void setMachineStatus(String machineStatus) {
        this.machineStatus = machineStatus;
    }

    public LocalDateTime getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(LocalDateTime insertTime) {
        this.insertTime = insertTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getMachineSup() {
        return machineSup;
    }

    public void setMachineSup(String machineSup) {
        this.machineSup = machineSup;
    }

    public String getCapitalTyped() {
        return capitalTyped;
    }

    public void setCapitalTyped(String capitalTyped) {
        this.capitalTyped = capitalTyped;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getMachineRoom() {
        return machineRoom;
    }

    public void setMachineRoom(String machineRoom) {
        this.machineRoom = machineRoom;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    public String getCapitalType() {
        return capitalType;
    }

    public void setCapitalType(String capitalType) {
        this.capitalType = capitalType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}
